package com.qkl.xiatang.app.web.controller;

import com.qkl.xiatang.app.dto.pond.PondBackupWebDTO;
import com.qkl.xiatang.app.service.impl.PondBatchService;
import com.qkl.xiatang.app.utils.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("{app.baseURL}")
@Slf4j
public class PondBatchController {

    @Autowired
    private PondBatchService pondBatchService;


    /**
     *  清塘
     * @param webDTO
     * @return
     */
    @PostMapping("/pondClean")
    public Result pondClean(@RequestBody PondBackupWebDTO webDTO) {
        Result result = ControllerHelper.toOperateResult(pondBatchService.pondClean(webDTO));
        log.info("===PondBatchController pondClean.result={}",result);
        return result;
    }

}
